package com.cykj.pos.mapper;

import com.cykj.pos.domain.BizMerchAddress;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cykj.pos.profit.dto.BizMerchAddressDTO;

import java.util.List;

/**
 * 伙伴地址Mapper接口
 *
 * @author jiaolili
 * @date 2021-04-28
 */
public interface BizMerchAddressMapper extends BaseMapper<BizMerchAddress> {

    /**
     * 更新数据
     * @param bizMerchAddress
     * @return
     */
    int updateByAddrId(BizMerchAddress bizMerchAddress);

    /**
     * 根据Id查询信息
     * @param bizMerchAddress
     * @return
     */
    BizMerchAddress selectListAddress(BizMerchAddress bizMerchAddress);

    /**
     * 删除地址根据ID
     * @param bizMerchAddress
     */
    void deleteByAddressId(BizMerchAddress bizMerchAddress);

    /**
     * 根据Id查询列表
     * @param bizMerchAddress
     * @return
     */
    List<BizMerchAddress> getListByUserId(BizMerchAddress bizMerchAddress);

    /**
     * 更改默认地址
     * @param type
     */
    void updateType(BizMerchAddress type);

    /**
     * 获得订单页的地址
     * @param bizMerchAddress
     * @return
     */
    List<BizMerchAddressDTO> queryAddressListByOrder(BizMerchAddress bizMerchAddress);

    /**
     * 通过地址id查询地址
     * @param orderId
     * @return
     */
    BizMerchAddress getOrderAddress(Long orderId);
}

